<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>title</title>
	<style type="text/css">
img{
	cursor:pointer;
}



	</style>
</head>
<body>
	<img src="1.jpg" id='imgid'>
</body>
<script type="text/javascript">
imgobj=document.getElementById('imgid');
imgobj.onmouseenter=function(){
	this.src='2.jpg';
	
}	
imgobj.onmouseleave=function(){
	this.src='1.jpg';
}
</script>
</html>